package com.lovo.service;

import com.lovo.dao.StudentDAO;
import com.lovo.model.StudentDO;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@NoArgsConstructor
@Service
public class StudentService implements IStudentService{
    @Resource
    private StudentDAO studentDAO;

    @Override
    public List<StudentDO> findall() {
        return studentDAO.findall();
    }

    @Override
    public void insert(StudentDO studentDO) {
       studentDAO.insert(studentDO);
    }

    @Override
    public void del(int id) {
       studentDAO.del(id);
    }

    @Override
    public void update(StudentDO stuentDO) {
        studentDAO.update(stuentDO);
    }
}
